package com.kfgj.hkp.manager.user.impl;

import com.kfgj.hkp.manager.AbstractManager;
import com.kfgj.hkp.common.dataaccess.mybatis.IMyBatisBaseDao;
import com.kfgj.hkp.dao.user.IPortUserDbDao;
import com.kfgj.hkp.entity.user.PortUserEntity;
import com.kfgj.hkp.manager.user.IPortUserManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PortUserManagerImpl extends AbstractManager<PortUserEntity> implements IPortUserManager {

    @Autowired
    private IPortUserDbDao portUserDbDao;

    @Override
    protected IMyBatisBaseDao<PortUserEntity, Long> getMyBatisDao () {
        return portUserDbDao;
    }

    @Override
    public int deleteAll () {
        return portUserDbDao.deleteAll ();
    }

    @Override
    public int createAll (List<PortUserEntity> list) {
        return portUserDbDao.batchInsert (list);
    }

    @Override
    public List<PortUserEntity> findPortUserByLittlePhone (String caller) {
        return portUserDbDao.findPortUserByLittlePhone (caller);
    }
}
